﻿using System.Windows.Media.Media3D;

namespace LFSRecord2.Model
{
    public class CompLayerReplayDataMesh : CompLayerMeshBase
    {
        public CompLayerReplayDataMesh()
            : base()
        {
            LayerType = CompLayerTypes.ReplayData;

            NumPoints = 8;
            NumLineIndexes = 24;

            // Set body points
            Points = new Point3D[NumPoints];
            Points[0] = new Point3D(-6.5, -6.5, -6.5);
            Points[1] = new Point3D(-6.5, 6.5, -6.5);
            Points[2] = new Point3D(6.5, 6.5, -6.5);
            Points[3] = new Point3D(6.5, -6.5, -6.5);

            Points[4] = new Point3D(-6.5, -6.5, 6.5);
            Points[5] = new Point3D(-6.5, 6.5, 6.5);
            Points[6] = new Point3D(6.5, 6.5, 6.5);
            Points[7] = new Point3D(6.5, -6.5, 6.5);

            // Set body lines
            LineIndexes = new int[NumLineIndexes];
            LineIndexes[0] = 0; LineIndexes[1] = 1;
            LineIndexes[2] = 1; LineIndexes[3] = 2;
            LineIndexes[4] = 2; LineIndexes[5] = 3;
            LineIndexes[6] = 3; LineIndexes[7] = 0;

            LineIndexes[8] = 4; LineIndexes[9] = 5;
            LineIndexes[10] = 5; LineIndexes[11] = 6;
            LineIndexes[12] = 6; LineIndexes[13] = 7;
            LineIndexes[14] = 7; LineIndexes[15] = 4;

            LineIndexes[16] = 0; LineIndexes[17] = 4;
            LineIndexes[18] = 1; LineIndexes[19] = 5;
            LineIndexes[20] = 2; LineIndexes[21] = 6;
            LineIndexes[22] = 3; LineIndexes[23] = 7;
        }
    }
}

